package org.jet.emall.rbac.transfer;


import org.jet.emall.rbac.dto.AdminRoleDTO;
import org.jet.emall.rbac.po.AdminRole;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.List;

/**
 * @author xiaozai
 * @version 1.0
 * @date 2020-04-05 11:16
 */
@Mapper
public interface AdminRoleDtoTransfer {
    AdminRoleDtoTransfer INSTANCE = Mappers.getMapper(AdminRoleDtoTransfer.class);

    /**
     * 将PO集合转DTO集合
     * @param records
     * @return
     */
    List<AdminRoleDTO> toDtoList(List<AdminRole> records);

    /**
     * 将管理员角色DTO转PO
     * @param adminRoleDTO
     * @return
     */
    AdminRole toPo(AdminRoleDTO adminRoleDTO);
}
